import service from '@/utils/request'

const VillageAreaApi = {
  // ----------------栋单元层--------------
  listVillageArea:function(data){
    return service.get('villageArea/tree', {params:data})
  },
  addVillageArea:function(data){
    return service.post('villageArea', data)
  },
  deleteVillageArea:function(data){
    return service.put('villageArea/delete', data)
  },
  editVillageArea:function(data){
    return service.put('villageArea', data)
  },
  getVillageAreaInfo:function(data){
    return service.get('villageArea', {params:data})
  },
  getListTree:function(data){
    return service.get("villageArea/idNameTree",{params:data})
  },
  importVArea:function(data){
    return service.get("/villageArea/importVArea",{params:data})
  },
  batchDelete:function(data){
    return service.put('villageArea/batchDelete', data)
  },
  // 根据层id获取门牌号
  ListHouseNumber:function(data){
    return service.get("userHarvestAddress/listHouseNumber",{params:data})
  },

  // 根据楼栋层查询出匹配的门牌号，并返回对应楼栋层的数据
  ListDetailHouseNumber:function(data){
    return service.get("villageArea/listDetailHouseNumber",{params:data})
  },

}

export default VillageAreaApi
